import service from '../utils/request.js'; // 引入二次封装的 axios


// 养老院信息管理
export const addNursingHome = (nursingHome) => {
    return service.post('/api/admin/nursingHome/add', nursingHome);
};

export const deleteNursingHomeById = (id) => {
    return service.post(`/api/admin/nursingHome/delete/${id}`);
};

export const getNursingHomeById = (id) => {
    return service.get(`/api/admin/nursingHome/detail/${id}`);
};

export const listNursingHomes = (params) => {
    return service.post('/api/admin/nursingHome/list', params );
};

export const updateNursingHome = (nursingHome) => {
    return service.post('/api/admin/nursingHome/update', nursingHome);
};

export const batchDeleteNursingHome = (ids) => {
    return service.post('/api/admin/nursingHome/batchDelete', ids );
};
export const clientlistNursingHomes = (params) => {
    return service.post('/api/client/nursingHome/list',  params);
};

export const clientgetNursingHomeById = (id) => {
    return service.get(`/api/client/nursingHome/detail/${id}`);
};